<?=View::factory('admin/common/header')?>
<div id="content">
  <div class="breadcrumb">
    <a href="<?=URL::site('admin')?>">管理首页</a>
    &raquo; 管理员列表
  </div>
  <?=View::factory('admin/common/message')?>
  <div class="box">
    <div class="heading">
      <h1><img src="<?=URL::base()?>images/admin/user.png" alt="" /> 管理员列表</h1>
      <div class="buttons">
        <input type="button" onclick="location='<?=URL::site('admin/manager/add')?>';" class="btn45" value="添加" />
      </div>
    </div>
    <div class="content">
    <table class="list">
      <thead>
        <tr>
          <td class="center">ID</td>
          <td class="left">登录邮箱</td>
          <td class="left">昵称</td>
          <td class="left">管理角色</td>
          <td class="left">注册日期</td>
          <td class="left">上次登录</td>
          <td class="left">状态</td>
          <td class="right">操作</td>
        </tr>
      </thead>
      <tbody>
        <? foreach ($managers as $admin) { ?>
        <tr>
          <td class="center"><?=$admin['member_id']?></td>
          <td class="left"><?=$admin['email']?></td>
          <td class="left"><?=$admin['nickname']?></td>
          <td class="left"><?=$admin['role_name']?></td>
          <td class="left"><?=date('Y-m-d H:i', $admin['reg_time']); ?></td>
          <td class="left"><?=$admin['last_time']?date('Y-m-d H:i:s', $admin['last_time']).' / '.$admin['last_ip']:'&nbsp;'?></td>
          <td class="left"><?=Member::status($admin['status'])?></td>
          <td class="right">
            [ <a href="<?=URL::site('admin/manager/edit/'.$admin['member_id'])?>">编辑</a> ]
            [ <a href="javascript: $.ajax_get({url:'<?=URL::site('admin/manager/del/'.$admin['member_id'])?>'}); void(0);" class="delete">删除</a> ]
          </td>
        </tr>
        <? } ?>
      </tbody>
    </table>
    </div>
  </div>
</div>
<?=View::factory('admin/common/footer')?>
<script type="text/javascript">
$().ready(function(){
    $('#system').addClass('selected');
});
</script>